package Control;
import java.util.*;


public class Season {
	private int number;
	private String name;
	private ArrayList<Episode> episodes;
	private ArrayList<Character> newCharacters;
	
	public Season() {
		super();
		episodes = new ArrayList<Episode>();
		newCharacters = new ArrayList<Character>();
	}

	public Season(int number, String name, ArrayList<Episode> episodes,
			ArrayList<Character> newCharacters) {
		super();
		this.number = number;
		this.name = name;
		this.episodes = episodes;
		this.newCharacters = newCharacters;
	}

	public int getNumber() {
		return number;
	}

	public void setNumber(int number) {
		this.number = number;
		this.name = "Season " + this.number;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public ArrayList<Episode> getEpisodes() {
		return episodes;
	}

	public void setEpisodes(ArrayList<Episode> episodes) {
		this.episodes = episodes;
	}

	public ArrayList<Character> getNewCharacters() {
		return newCharacters;
	}

	public void setNewCharacters(ArrayList<Character> newCharacters) {
		this.newCharacters = newCharacters;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + number;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Season other = (Season) obj;
		if (number != other.number)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return this.getName();
	}
	
	

}
